Random access method, random access response method, terminal, and network device

ABSTRACT

A random access method includes: sending a random access message to a network device; receiving an RAR message from the network device, wherein the RAR message includes indication information, and the indication information indicates a format type of the RAR message; and performing a corresponding random access operation based on the indication information.

CROSS-REFERENCE OF RELATED APPLICATIONS

This application is a Bypass Continuation Application ofPCT/CN2020/094878 filed on Jun. 8, 2020, which claims priority toChinese Patent Application No. 201910517640.2 filed on Jun. 14, 2019,which are incorporated herein by reference in their entirety.

TECHNICAL FIELD

The present disclosure relates to the field of communicationstechnologies, and in particular, to a random access method, a randomaccess response method, a terminal, and a network device.

BACKGROUND

Not like a 4-step RACH procedure, a new random access procedure, thatis, a 2-step RACH procedure, has been introduced at present. In the2-step RACH procedure, a terminal may trigger the 2-step RACH procedurein which a random access message is sent to a network device, and thenthe network device may send a random access response (RAR) message tothe terminal after receiving the random access message.

However, although the 2-step RACH procedure is introduced, for contentincluded in the RAR message is not definitive, causing incapability ofthe terminal to differentiate between different cases of response.

SUMMARY

According to a first aspect, an embodiment of the present disclosureprovides a random access method applied to a terminal, including:

sending a random access message to a network device;

receiving an RAR message from the network device, where the RAR messageincludes indication information, and the indication informationindicates a format type of the RAR message; and

performing a corresponding random access operation based on theindication information.

According to a second aspect, an embodiment of the present disclosureprovides a random access response method applied to a network device,including:

receiving a random access message from a terminal;

sending an RAR message to the terminal, where

the RAR message includes indication information, and the indicationinformation indicates a format type of the RAR message.

According to a third aspect, an embodiment of the present disclosureprovides a random access method applied to a terminal, including:

sending a random access message to a network device;

receiving an RAR message from the network device, where the RAR messageincludes control information corresponding to a requirement of theterminal; and determining a random access procedure to be successfulbased on the control information.

According to a fourth aspect, an embodiment of the present disclosureprovides a terminal, including:

a first sending module, configured to send a random access message to anetwork device;

a first receiving module, configured to receive an RAR message from thenetwork device, where the RAR message includes indication information,and the indication information indicates a format type of the RARmessage; and

an execution module, configured to perform a corresponding random accessoperation based on the indication information.

According to a fifth aspect, an embodiment of the present disclosureprovides a network device, including:

a second receiving module, configured to receive a random access messagefrom a terminal;

a second sending module, configured to send an RAR message to theterminal, where

the RAR message includes indication information, and the indicationinformation indicates a format type of the RAR message.

According to a sixth aspect, an embodiment of the present disclosureprovides a terminal, including:

a third sending module, configured to send a random access message to anetwork device;

a third receiving module, configured to receive an RAR message from thenetwork device, where the RAR message includes control informationcorresponding to a requirement of the terminal; and

a determining module, configured to determine a random access procedureto be successful based on the control information.

According to a seventh aspect, an embodiment of the present disclosureprovides a terminal, including a memory, a processor, and a computerprogram that is stored in the memory and executable on the processor,where when the computer program is executed by the processor, the stepsof the random access method according to the first aspect areimplemented, or the steps of the random access response method accordingto the second aspect are implemented, or the steps of the random accessmethod according to the third aspect are implemented.

According to an eighth aspect, an embodiment of the present disclosureprovides a non-transitory computer-readable storage medium, storing acomputer program, where when the computer program is executed by aprocessor, the steps of the random access method according to the firstaspect are implemented, or the steps of the random access responsemethod according to the second aspect are implemented, or the steps ofthe random access method according to the third aspect are implemented.

DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in embodiments of the presentdisclosure more clearly, the following briefly describes theaccompanying drawings for the embodiments of the present disclosure.Clearly, the accompanying drawings in the following descriptions showmerely some embodiments of the present disclosure, and a person ofordinary skill in the art may still derive other drawings from theseaccompanying drawings.

FIG. 1 is a flowchart of a 2-step RACH procedure according to anembodiment of the present disclosure;

FIG. 2 is a first flowchart of a random access method according to anembodiment of the present disclosure;

FIG. 3A is a first schematic diagram of a format of a MAC RAR subheaderincluding beam indication (BI) information according to an embodiment ofthe present disclosure;

FIG. 3B is a schematic diagram of a format of a MAC RAR subheaderincluding a RAPID according to an embodiment of the present disclosure;

FIG. 4A is a first schematic diagram of a format of fallback RARaccording to an embodiment of the present disclosure;

FIG. 4B is a first schematic diagram of a format of success RARaccording to an embodiment of the present disclosure;

FIG. 4C is a first schematic diagram of a plurality of RAR messagesmultiplexed for sending according to an embodiment of the presentdisclosure;

FIG. 5A is a second schematic diagram of a format of a MAC RAR subheaderincluding BI information according to an embodiment of the presentdisclosure;

FIG. 5B is a schematic diagram of a format of a MAC RAR subheader otherthan one including BI information according to an embodiment of thepresent disclosure;

FIG. 6A is a second schematic diagram of a format of fallback RARaccording to an embodiment of the present disclosure;

FIG. 6B is a third schematic diagram of a format of fallback RARaccording to an embodiment of the present disclosure;

FIG. 6C is a second schematic diagram of a format of success RARaccording to an embodiment of the present disclosure;

FIG. 6D is a second schematic diagram of a plurality of RAR messagesmultiplexed for sending according to an embodiment of the presentdisclosure;

FIG. 7 is a schematic diagram of a format of integrated MAC RARsubheader and MAC RAR according to an embodiment of the presentdisclosure;

FIG. 8 is a flowchart of a random access response method according to anembodiment of the present disclosure;

FIG. 9 is a second flowchart of a random access method according to anembodiment of the present disclosure;

FIG. 10A is a first schematic diagram of a format of a MAC subheaderaccording to an embodiment of the present disclosure;

FIG. 10B is a first schematic diagram of a format of a MAC CE accordingto an embodiment of the present disclosure;

FIG. 10C is a second schematic diagram of a format of a MAC CE accordingto an embodiment of the present disclosure;

FIG. 11A is a second schematic diagram of a format of a MAC subheaderaccording to an embodiment of the present disclosure;

FIG. 11B is a first schematic diagram of a format of a MAC subPDUaccording to an embodiment of the present disclosure;

FIG. 11C is a second schematic diagram of a format of a MAC subPDUaccording to an embodiment of the present disclosure;

FIG. 12 is a first schematic structural diagram of a terminal accordingto an embodiment of the present disclosure;

FIG. 13 is a first schematic structural diagram of a network deviceaccording to an embodiment of the present disclosure;

FIG. 14 is a second schematic structural diagram of a terminal accordingto an embodiment of the present disclosure;

FIG. 15 is a third schematic diagram of a terminal according to anembodiment of the present disclosure; and

FIG. 16 is a second schematic structural diagram of a network deviceaccording to an embodiment of the present disclosure.

DETAILED DESCRIPTION OF EMBODIMENTS

Terms “first”, “second”, and the like in the description and claims ofthis application are used to distinguish similar objects, instead ofdescribing a specific sequence or order. It should be understood thatdata used in such a way is interchangeable in proper situations, so thatthe embodiments of the present disclosure described herein can beimplemented in sequences other than those illustrated or describedherein. In addition, the terms “comprise”, “include”, and any variantsthereof are intended to cover non-exclusive inclusion. For example, aprocess, a method, a system, a product, or a device that includes aseries of steps or units is not necessarily limited to those steps orunits listed expressly, but instead may include other steps or units notexpressly listed or inherent to the process, the method, the product, orthe device.

A wireless communications system in the embodiments of the presentdisclosure includes a terminal and a network device. The terminal mayalso be referred to as a terminal device or user equipment (UE). Theterminal may be terminal side device such as a mobile phone, a tabletpersonal computer, a laptop computer, a personal digital assistant(PDA), a mobile internet device (MID), a wearable device, or avehicle-mounted device. It should be noted that a specific type of theterminal is not limited in the embodiments of the present disclosure.The network device may be a base station or a core network. The basestation may be a base station of 5G and later releases (for example, agNB and a 5G NR NB), or a base station in other communications systems(for example, an eNB, a WLAN access point, or other access points). Thebase station may be referred to as a NodeB, an evolved NodeB, an accesspoint, a base transceiver station (BTS), a radio base station, a radiotransceiver, a basic service set (BSS), an extended service set (ESS), aNodeB, an evolved NodeB (eNB), a home NodeB, a home evolved NodeB, aWLAN access point, a Wi-Fi node, or another appropriate term in the art.Provided that the same technical effects are achieved, the base stationis not limited to specific technical vocabulary.

Optionally, an applicable scenario for the embodiments of the presentdisclosure may be a 2-step RACH procedure. As shown in FIG. 1, the2-step RACH procedure may include the following steps:

Step 11: A network device configures configuration information of 2-stepRACH for a terminal, where the configuration information includes, forexample, sending resource information corresponding to a random accessmessage and a random access response message, the random access messagemay be referred to as a random access request message or MsgA, and therandom access response message may be referred to as MsgB.

Step 12: The terminal triggers the 2-step RACH procedure, and sends MsgAto the network device, where MsgA may be sent through a physical uplinkshared channel (PUSCH), and MsgA at least includes request data and aterminal identifier ID.

Step 13: The network device sends MsgB to the terminal. If the terminalfails to receive MsgB, the terminal may send MsgA again.

For the 2-step RACH procedure, MsgA may be equivalent to a combinationof content included in Msg1 and Msg3 in a 4-step RACH procedure, andMsgB may be equivalent to a combination of content included in Msg2 andMsg4 in the 4-step RACH procedure. Responses fed back by MsgB mayinclude any one of the following: (1) for a case in which MsgA includescommon control channel (CCCH) information, MsgB may indicate at leastone of: backoff indicator (BI) information, a fallback RAR message, or asuccess RAR message, and the success RAR message may include terminaldedicated downlink data; and (2) for a case in which MsgA includes acell-radio network temporary identifier (C-RNTI), the network deviceneeds to respond to the terminal, so that the network device sendsscheduling signaling that includes a timing advanced command (TAC) or anuplink grant and that is for using a physical downlink control channel(PDCCH) addressed to the C-RNTI, to notify the terminal of a successcontention resolution.

Optionally, after the terminal sends MsgA including the CCCHinformation, the terminal may listen on, in a window of MsgB, schedulingsignaling for the PDCCH addressed to an RA-RNTI (PDCCH addressed toRA-RNTI):

(1) If receiving a fallback RAR message for the terminal, the terminalcan perform a fallback operation, and falls back a 4-step RACHprocedure;

(2) If receiving a success RAR message for the terminal, and withsuccessful verification of a contention resolution identifier, theterminal can determine the random access procedure to be successful;

(3) If receiving a success RAR message for the terminal, and withsuccessful verification of a contention resolution identifier, theterminal can perform a process of receiving related data based oninformation about an included terminal dedicated SRB or data indicatedby the network device, and determine the random access procedure to besuccessful; and

(4) If receiving no fallback RAR message or success RAR message for theterminal in the window of MsgB, the terminal can try the 2-step RACHprocedure again after performing a fallback operation based on the BIinformation.

Optionally, after the terminal sends MsgA including the C-RNTI, theterminal may listen on, in the window of MsgB, scheduling signaling forthe PDCCH addressed to the RA-RNTI and the PDCCH addressed to C-RNTI:

(1) If receiving a fallback RAR message for the terminal, the terminalcan perform a fallback operation, and fall back a 4-step RACH procedure;

(2) If TAC signaling and/or uplink scheduling resources are included inthe received scheduling signaling for the PDCCH addressed to the C-RNTI,the terminal can determine the random access procedure to be successful;and

(3) If receiving no fallback RAR message or success RAR message for theterminal in the window of MsgB, the terminal can try the 2-step RACHprocedure again after performing a fallback operation based on the BIinformation.

The following describes the present disclosure in detail with referenceto the embodiments and accompanying drawings.

Refer to FIG. 2. FIG. 2 is a flowchart of a random access methodaccording to an embodiment of the present disclosure. The method isapplied to a terminal. As shown in FIG. 2, the method includes thefollowing steps:

Step 201: A random access message is sent to a network device.

Optionally, the random access message may be referred to as a randomaccess request message or MsgA. The random access message may includeCCCH information.

In an implementation, when the terminal is in an idle mode or inactivemode, the terminal may initiate a radio resource control (RRC)connection establishment procedure or an RRC connection recoveryprocedure, and at this time, a 2-step RACH procedure may be triggered,to form uplink synchronization with the network device and complete asignaling exchange procedure. When the 2-step RACH procedure istriggered, the terminal may, in MsgA, send random access preamble, andsend MsgA equivalent to Msg3 in a 4-step RACH procedure on acorresponding uplink PUSCH, where MsgA carries CCCH information; and theCCCH information may be used for RRC connection establishment, RRCconnection recovery, or the like.

Step 202: A RAR message is received from the network device.

Optionally, the RAR message may include indication information, and theindication information indicates a format type of the RAR message.

Step 203: A corresponding random access operation is performed based onthe indication information.

According to the random access method in this embodiment of the presentdisclosure, the corresponding random access operation is performed basedon the indication information included in the RAR message. Theindication information indicates the type of format of the RAR message,so that at least content included in an RAR message in a random accessprocedure (for example, a 2-step RACH procedure) can be clear.Therefore, a terminal can differentiate between different cases ofresponse from a network device, thereby reducing a latency andprocessing complexity in a random access procedure.

Understandably, for the network device, receiving of MsgA for theterminal may include any one of the following possible cases:

both the preamble and corresponding PUSCH content are successfullyreceived;

the preamble is successfully received, but the corresponding PUSCHcontent is unsuccessfully received;

the preamble is unsuccessfully received, but the corresponding PUSCHcontent is successfully received; and

neither the preamble nor the corresponding PUSCH content is successfullyreceived.

According to different cases of receiving and a status of a network, thenetwork device may response to different content, to instruct theterminal for a next action. Besides, because an RA-RNTI is calculatedbased on a location of a time-frequency resource for the terminal tosend a preamble or MsgA, a same RA-RNTI may correspond to a plurality ofterminals That is, to improve efficiency of responses, the networkdevice may multiplex response messages to the plurality of terminalstogether for sending.

Optionally, content of a response from the network device to MsgA forthe terminal may at least include several following items:

BI information;

a fallback RAR message;

a success RAR message; and

a success RAR message and terminal dedicated data (UE dedicated data).

In at least one embodiment of the present disclosure, based on contentof a response from the network device to a random access message (suchas MsgA) for the terminal, the indication information included in theRAR message may at least adopt the following two forms. Descriptions areas follows:

Form 1

In the form 1, the indication information may include a first indicatorfield, and the first indicator field indicates that the RAR messageincludes the BI information or RAR information.

In an implementation, the RAR information may be selected as a randomaccess preamble identifier (RAPID).

In an implementation, the first indicator field may be a T fieldincluded in a media access control (MAC) RAR subheader, and the T fieldmay be referred to as a T1 field or the like.

For example, refer to FIG. 3A. FIG. 3A is a schematic diagram of aformat of a MAC RAR subheader including BI information. The MAC RARsubheader may at least include the following fields:

E field (such as 1 bit): used to indicate whether a current MAC subPDUis the last one, where for example, a value of the E field may be 0 or1, 0 indicates that there is another MAC subPDU subsequently, 1indicates that the current MAC subPDU is the last one, and remainingcontent are padding bits;

T field (such as 1 bit): type indication information, used to indicatethat a corresponding RAR message includes BI information or MAC RARinformation, where for example, if a value of the T field is 0 or 1, 0indicates that the BI information is included, 1 indicates that the MACRAR information is included, and a value of the T field shown in FIG. 3Ais 0;

R field (such as 1 bit): a reserved bit, where for example, a value ofthe R field may be 0;

BI field (such as 4 bits): used to indicate fallback in a case ofnetwork overload.

For another example, refer to FIG. 3B. FIG. 3B is a schematic diagram ofa format of a MAC RAR subheader including a RAPID. The MAC RAR subheadermay at least include the following fields:

E field (such as 1 bit): used to indicate whether a current MAC subPDUis the last one, where for example, a value of the E field may be 0 or1, 0 indicates that there is another MAC subPDU subsequently, 1indicates that the current MAC subPDU is the last one, and remainingcontent are padding bits;

T field (such as 1 bit): type indication information, used to indicatethat a corresponding RAR message includes BI information or MAC RARinformation, where for example, if a value of the T field is 0 or 1, 0indicates that the BI information is included, 1 indicates that the MACRAR information is included, and a value of the T field shown in FIG. 3Bis 1;

RAPID field (such as 6 bits): used to correspond to a preamble used by arandom access message (such as MsgA). It should be noted that, if apreamble corresponding to a RAPID is a preamble specifically configuredfor a system information (SI) request, no MAC RAR information needs tobe carried subsequently.

Optionally, in a case in which the first indicator field indicates thatthe RAR message includes the RAR information, the indication informationmay further include a second indicator field, and the second indicatorfield indicates that the format of the RAR message is a format offallback RAR or a format of success RAR.

In an implementation, the second indicator field may be selected as a T2field included in a format of a MAC RAR message (for example, a formatof fallback RAR or a format of success RAR).

Optionally, in a case in which the second indicator field indicates thatthe format of the RAR message is the format of success RAR, theindication information may further include a third indicator field, andthe third indicator field indicates whether the RAR message includesterminal dedicated data.

In an implementation, the third indicator field may be selected as a Pfield included in the format of success RAR.

The third indicator field may be selected as at least 1 bit. When thelength of the third indicator field is 1 bit, the third indicator fieldindicates whether the RAR message includes the terminal dedicated data;or when the length of the third indicator field is at least 1 bit, thethird indicator field indicates whether the RAR message includes theterminal dedicated data and a quantity of units of the terminaldedicated data included in the RAR message in a case in which the RARmessage includes the terminal dedicated data.

Optionally, the terminal dedicated data may be at least one of a MACservice data unit (SDU) or a MAC control element (CE).

For example, if there is one unit of terminal dedicated data, theterminal dedicated data may be selected as a MAC SDU or MAC CE; or ifthere are a plurality of units of terminal dedicated data, the pluralityof units of terminal dedicated data may all be MAC SDUs, or may all beMAC CEs, or may be that one part are MAC SDUs and the other part are MACCEs.

In an implementation, as shown in FIG. 4A, the format of fallback RARmay at least include the following fields:

T2 field (such as 1 bit): used to indicate that a format of a currentMAC RAR message is the format of fallback RAR or the format of successRAR, where for example, if a value of the T2 field is 0 or 1, 0indicates the format of fallback RAR, 1 indicates the format of successRAR, and a value of the T2 field shown in FIG. 4A is 0;

TAC field (such as 12 bits): used to send an uplink advance of theterminal;

Uplink grant field (such as 27 bits): used to allocate uplink grants fortransmitting a random access message for the terminal; and

T-C-RNTI (that is, Temporary C-RNTI) field (such as 16 bits): used toallocate a temporary C-RNTI for a fallback terminal (fallback UE).

In another implementation, as shown in FIG. 4B, the format of successRAR may at least include the following fields:

T2 field (such as 1 bit): used to indicate that a format of a currentMAC RAR message is the format of fallback RAR or the format of successRAR, where for example, if a value of the T2 field is 0 or 1, 0indicates the format of fallback RAR, 1 indicates the format of successRAR, and a value of the T2 field shown in FIG. 4B is 1;

R field (such as 1 bit): a reserved bit, where for example, a value ofthe R field may be 0;

TAC field (such as 12 bits): used to send an uplink advance of theterminal;

C-RNTI field (such as 16 bits): used to allocate a C-RNTI for a successterminal (success UE);

Contention resolution identifier (Contention Resolution ID) field (suchas 48 bits): used to send content of CCCH information in MsgA for theterminal, where if a size of the CCCH information is greater than 48bits, first 48 bits of information in the CCCH information can be usedfor filling; and

P field (such as, optionally, 1 bit, 2 bits, or 3 bits): used toindicate whether a corresponding RAR message includes terminal dedicateddata.

It should be noted that a size of the P field may be selected based onactual cases, and may indicate different cases. How many bits areselected for the P field may be specified in a protocol, or may beconfigured in a system message.

For example, when the length of the P field is 1 bit, a value of the Pfield may be 0 or 1, where 0 indicates that a corresponding success RARmessage does not include any terminal dedicated data, and the terminaldedicated data may be, for example, terminal dedicated signaling radiobearer (SRB) subPDU or data radio bearer (DRB) subPDU; and 1 indicatesthat a corresponding success RAR message includes one terminal dedicatedSRB subPDU or DRB subPDU.

For another example, when the length of the P field is 2 bits, a valueof the P field may be 00, 01, 10, or 11, where 00 indicates that acorresponding success RAR message does not include a terminal dedicatedSRB subPDU and DRB subPDU, 01 indicates that a corresponding success RARmessage includes one terminal dedicated SRB subPDU or DRB subPDU, 10indicates that a corresponding success RAR message includes two units ofterminal dedicated data (where the data is, for example, a SRB subPDU orDRB subPDU), and 11 indicates that a corresponding success RAR messageincludes three units of terminal dedicated data (where the data is, forexample, a SRB subPDU or DRB subPDU).

For another example, when the length of the P field is 3 bits, a valueof the P field may be 000, 001, 010, 011, 100, 101, 110, or 111, where000 indicates that a corresponding success RAR message does not includeterminal dedicated data, 001 indicates that a corresponding success RARmessage includes one unit of terminal dedicated data, 010 indicates thata corresponding success RAR message includes two units of terminaldedicated data, 011 indicates that a corresponding success RAR messageincludes three units of terminal dedicated data, 100 indicates that acorresponding success RAR message includes four units of terminaldedicated data, 101 indicates that a corresponding success RAR messageincludes five units of terminal dedicated data, 110 indicates that acorresponding success RAR message includes six units of terminaldedicated data, and 111 indicates that a corresponding success RARmessage includes seven units of terminal dedicated data; and theterminal dedicated data herein may be a SRB subPDU or DRB subPDU.

In another implementation, the network device may multiplex responsemessages to a plurality of terminals together for sending. As shown inFIG. 4C, for example, a MAC RAR subheader (including BI information) ofUE 1, a MAC RAR subheader (including RAPID) of UE 2, a fallback RARmessage for UE 3, a success RAR message for UE 4, and the like aremultiplexed together for sending.

It should be noted that, for the foregoing SRB subPDU or DRB subPDU, aformat of MAC data subPDU may be used. The terminal may learn data aboutto which logical channel a corresponding subPDU belongs and a length ofthe data based on a logical channel identifier (LCID) and an L field,and when a value of the LCID field is special, that the correspondingsubPDU is a MAC CE subPDU may further be indicated. To be specific,after the terminal reads the LCID field and L field, a size of thecorresponding subPDU may be determined, and if data is of the terminal,the data can be parsed; or if data is not of the terminal, the data canbe skipped, and decoding of remaining subPDUs continues, to obtain dataof the terminal.

Form 2

In the form 2, the indication information may include a fourth indicatorfield, and the fourth indicator field indicates any one of thefollowing:

the RAR message includes BI information;

the format of the RAR message is the format of fallback RAR;

the format of the RAR message is the format of success RAR;

whether the RAR message includes terminal dedicated data; and

the RAR message includes a quantity of units of the terminal dedicateddata.

In an implementation, the fourth indicator field may be selected as a Tfield included in a MAC RAR subheader, and the T field may be selectedas 2 or 3 bits.

For example, refer to FIG. 5A. FIG. 5A is a schematic diagram of aformat of a MAC RAR subheader including BI information. The MAC RARsubheader may at least include the following fields:

E field (such as 1 bit): used to indicate whether a current MAC subPDUis the last one, where for example, a value of the E field may be 0 or1, 0 indicates that there is another MAC subPDU subsequently, 1indicates that the current MAC subPDU is the last one, and remainingcontent are padding bits;

T field (may be 2 or 3 bits): type indication information, used toindicate whether a corresponding RAR message includes BI information, aformat of the corresponding RAR message, and the like;

R field (such as 1 bit): a reserved bit, where for example, a value ofthe R field may be 0;

BI field (such as 4 bits): used to indicate fallback in a case ofnetwork overload.

For another example, refer to FIG. 5B. FIG. 5B is a schematic diagram ofa format of a MAC RAR subheader other than one including BI information.The MAC RAR subheader may at least include the following fields:

E field (such as 1 bit): used to indicate whether a current MAC subPDUis the last one, where for example, a value of the E field may be 0 or1, 0 indicates that there is another MAC subPDU subsequently, 1indicates that the current MAC subPDU is the last one, and remainingcontent are padding bits;

T field (may be 2 or 3 bits): type indication information, used toindicate whether a corresponding RAR message includes BI information, aformat of the corresponding RAR message, and the like;

R field (such as 1 bit): a reserved bit, where for example, a value ofthe R field may be 0.

An example in which the T field is 2 or 3 bits is used for descriptionbelow, the T field in this embodiment is described with reference toTable 1 and Table 2 with examples.

(1) For example, the T field is 2 bits. As shown in Table 1, a value ofthe T field may be 00, 01, 10, or 11, where 00 indicates that acorresponding RAR message includes BI information, 01 indicates that aformat of a corresponding RAR message is a format of fallback RAR, 10indicates that a format of a corresponding RAR message is a format ofsuccess RAR, and 11 indicates that a corresponding RAR message includesone unit of terminal dedicated data, where the terminal dedicated datais, for example, a MAC SDU or MAC CE.

TABLE 1 T field Description 00 Including BI information 01 Format offallback RAR 10 Format of success RAR 11 Including one unit of terminaldedicated data

(2) For example, the length of the T field is 3 bits. As shown in Table2, a value of the T field may be 000, 001, 010, 011, 100, 101, 110, or111, where 000 indicates that a corresponding RAR message includes BIinformation, 001 indicates that a format of a corresponding RAR messageis a format of fallback RAR, 010 indicates that a format of acorresponding RAR message is a format of success RAR, 011 indicates thata corresponding RAR message includes one unit of terminal dedicateddata, 100 indicates that a corresponding RAR message includes two unitsof terminal dedicated data, 101 indicates that a corresponding RARmessage includes three units of terminal dedicated data or reserveddata, 110 indicates that a corresponding RAR message includes four unitsof terminal dedicated data or reserved data, and 111 indicates that acorresponding RAR message includes five units of terminal dedicated dataor reserved data.

TABLE 2 T field Description 000 Including BI information 001 Format offallback RAR 010 Format of success RAR 011 Including one unit ofterminal dedicated data 100 Including two units of terminal dedicateddata 101 Including three units of terminal dedicated data or reserveddata 110 Including four units of terminal dedicated data or reserveddata 111 Including five units of terminal dedicated data or reserveddata

It should be noted that on the basis of the foregoing fourth indicatorfield (for example, the T field in the MAC RAR subheader), a format of acorresponding RAR message may be the format of fallback RAR or theformat of success RAR. Optionally, the format of fallback RAR mayinclude a field similar to that shown in FIG. 4A, and the format ofsuccess RAR may include a field similar to that shown in FIG. 4B, butthere are differences at least as follows:

(1) In a case in which the fourth indicator field indicates that theformat of the RAR message is the format of fallback RAR, the RAR messageincludes a RAPID for identity verification; and

(2) In a case in which the fourth indicator field indicates that theformat of the RAR message is the format of success RAR, the RAR messagemay not include a RAPID, a reason for which is that the terminal mayperform identity verification by using a contention resolutionidentifier field without a RAPID for identity verification, so that aRAPID may not be included.

For different types of formats of a fallback RAR message and a successRAR message, because a T field in a MAC RAR subheader is used fordifferentiation, and a quantity of units of included terminal dedicateddata may be indicated in the T field, RAR formats may not bedifferentiated and indicated subsequently.

For example, as shown in FIG. 6A and FIG. 6B, the corresponding formatof fallback RAR may at least include the following fields:

T2 field (such as 1 bit): used to indicate that a format of a currentMAC RAR message is the format of fallback RAR or the format of successRAR, where for example, if a value of the T2 field is 0 or 1, 0indicates the format of fallback RAR, 1 indicates the format of successRAR, and a value of the T2 field shown in FIG. 6A and FIG. 6B is 0; andit should be noted that, the T2 field may be replaced by an R field, andnot to indicate a format of an RAR message anymore;

R field (such as 1 bit): a reserved bit, where for example, a value ofthe R field may be 0;

RAPID field (such as 6 bits): used to correspond to a preamble used by arandom access message (such as MsgA).

TAC field (such as 12 bits): used to send an uplink advance of theterminal;

UL Grant field (such as 27 bits): used to allocate uplink grants fortransmitting a random access message for the terminal; and

T-C-RNTI field (such as 16 bits): used to allocate a temporary C-RNTIfor a fallback terminal (fallback UE).

For another example, as shown in FIG. 6C, the corresponding format ofsuccess RAR may at least include the following fields:

R field (such as 1 bit): a reserved bit, where for example, a value ofthe R field may be 0;

TAC field (such as 12 bits): used to send an uplink advance of theterminal;

C-RNTI field (such as 16 bits): used to allocate a C-RNTI for a successterminal (success UE);

Contention resolution identifier field (such as 48 bits): used to sendcontent of CCCH information in MsgA for the terminal, where if a size ofthe CCCH information is greater than 48 bits, first 48 bits ofinformation in the CCCH information can be used for filling; and

In an implementation, the network device may multiplex response messagesto a plurality of terminals together for sending. As shown in FIG. 6D,for example, a MAC RAR subheader (including BI information) of UE 1, afallback RAR message for UE 2, a success RAR message for UE 3, and thelike are multiplexed together for sending

It can be learned from the format of success RAR shown in FIG. 6C thatthe format of success RAR does not include a RAPID field, and thereasons are as follows: in one aspect, in a 2-step RACH procedure, aPUSCH may carry CCCH information, and the CCCH information may include aSI request message that can be indicated without a specific preamble,such that a RAPID field may not be included, and same effects can beachieved when a contention resolution identifier in the format ofsuccess RAR is directly used to correspond to the CCCH information sentby the terminal for responding to a successful SI request of theterminal; and in another aspect, if a RAPID format is requiredseparately, a particular value of the RAPID format may be assigned inthe T field; or the separate RAPID format is classified to a format offallback RAR first, and share a same T field indication with the formatof fallback RAR, and then a first R field in the foregoing of fallbackRAR is replaced with a T2 field, to indicate the separate RAPID formator usual format of fallback RAR, and as shown in FIG. 6A and FIG. 6B,the separate RAPID format only needs one byte, where the last six bitsare the RAPID field, the first bit is type indication information, andthe second bit is an R (reserved) bit.

It should be noted that in the foregoing embodiments, an MAC RARsubheader and an MAC RAR are each ordered with integer bytes separately,so that each are with a plurality of R bits. If the MAC RAR subheaderand the MAC RAR are integrated, a design for respective independence ofthe MAC RAR subheader and the MAC RAR is changed, but this can reduce awhole length and a size of an R bit, thereby reducing overheads.

In an implementation, an example of a success RAR message is used. Aformat of an integrated MAC RAR subheader and MAC RAR can be seen inFIG. 7. As shown in FIG. 7, the corresponding format after integrationmay be understood as that an integration of a MAC RAR subheader shown inFIG. 5B and the format of success RAR shown in FIG. 6C. In this case,actions of the terminal are not changed, only an RAR format is changed,and included content of a response is also similar. A biggest differenceis that a RAPID is not included in a success RAR message any more, whichis mainly because an RAPID can only be used to initially determine apreamble for corresponding uplink a terminal, but actually two terminalsmay use a same preamble, so that checking of a contention resolutionidentifier is still required for final determination of a terminalidentity, and therefore, a success RAR message carrying no RAPID doesnot impact final determination of a terminal.

In at least one embodiment of the present disclosure, step 203 mayinclude at least one of:

in a case in which the indication information indicates that the RARmessage includes BI information, performing a fallback operation basedon the BI information;

in a case in which the indication information indicates that the formatof the RAR message is the format of fallback RAR, performing a fallbackoperation;

in a case in which the indication information indicates that the formatof the RAR message is the format of success RAR, when the RAR messageincludes a contention resolution identifier and the contentionresolution identifier is verified successfully, determining a randomaccess procedure to be successful;

in a case in which the indication information indicates that the formatof the RAR message is the format of success RAR, when the RAR messageincludes a RAPID and a contention resolution identifier and the RAPIDand the contention resolution identifier are verified successfully,determining a random access procedure to be successful;

in a case in which the indication information indicates that the formatof the RAR message is the format of success RAR, when the RAR messageincludes a contention resolution identifier and the contentionresolution identifier is verified successfully, if the RAR messageincludes terminal dedicated data, performing a process of receivingrelated data based on information about the terminal dedicated dataindicated by the indication information; or

in a case in which the indication information indicates that the formatof the RAR message is the format of success RAR, when the RAR messageincludes a RAPID and a contention resolution identifier and the RAPIDand the contention resolution identifier are verified successfully, ifthe RAR message includes terminal dedicated data, performing a processof receiving related data based on information about the terminaldedicated data indicated by the indication information.

In this way, by using the indication information included in the RARmessage, a terminal can differentiate between different cases ofresponse from a network device and perform according processing, therebyreducing a latency and processing complexity in a random accessprocedure.

The following is described in detail actions of the terminal with anexample of a 2-step RACH procedure.

(1) If the terminal sends a special preamble for a SI request, theterminal may use the preamble and/or a related RNTI to parse a PDCCH ina window of MsgB; and if a RAPID corresponding to the preamble of theterminal is detected to be included in a response message, the terminaldetermines that the network device has correctly received the SIrequest, and waits to receive a SI subsequently, and a random accessprocedure for the SI request is successful.

(2) If MsgA sent by the terminal includes CCCH information, where theCCCH information is used for an RRC connection establishment request, anRRC connection recovery request, a SI request message similar to aconventional Msg3, or the like, the terminal may use a preamble and/or arelated RNTI to parse a PDCCH in a window of MsgB; and if a RAPIDcorresponding to the preamble of the terminal is detected to be includedin a response message:

if an RAR format corresponding to the RAPID is the format of fallbackRAR, the terminal may fall back to a 4-step RACH procedure and initiatesMsg3 transmission according to a UL grant indicated in the format offallback RAR; or

if an RAR format corresponding to the RAPID is the format of successRAR, the terminal may parse an RAR message according to the format ofsuccess RAR, and compare bit streams carried in a contention resolutionidentifier with CCCH information sent by the terminal, where if thecomparison is successful, contention resolution is determined to besuccessful, and a random access procedure is successful, or if thecomparison is unsuccessful, the RAR message is determined to be not aresponse message to the terminal, and listening goes on, where it shouldbe noted that, if contention resolution is successful, and a success RARmessage further includes extra downlink shared channel (DL-SCH) data,the terminal may parse each unit of the DL-SCH data based on a quantityof units of terminal dedicated data indicated in an RAR, and submit thedata to a higher layer for processing; and

if the RAPID does not correspond to the preamble of the terminal, orcontention resolution is unsuccessful, the terminal may skip an RARformat not belonging to the terminal and possible DL-SCH format in turnbased on an indication of each RAR format and a head indication, and trysubsequent RAPID comparison and RAR parsing, till a response to theterminal is found.

(3) If any RAR message corresponding to the RAPID of the terminal is notreceived in a window of MsgB by the terminal, or no contentionresolution is successful, the terminal may determine that a randomaccess procedure is unsuccessful, perform a specific random delay basedon BI information received in the window of MsgB, initiate a nextunsuccessful random access, failing till a preset maximum quantity oftimes of random access is reached, and report the random access failuresto a higher layer.

Refer to FIG. 8. FIG. 8 is a flowchart of a random access responsemethod according to an embodiment of the present disclosure. The methodis applied to a network device. As shown in FIG. 8, the method includesthe following steps:

Step 801: A random access message is received from a terminal.

Step 802: A RAR message is sent to the terminal.

Optionally, the RAR message includes indication information, and theindication information indicates a format type of the RAR message.

According to the random access response method in this embodiment of thepresent disclosure, by using the indication information included in theRAR message, at least content included in an RAR message in a randomaccess procedure (for example, a 2-step RACH procedure) can be clear.Therefore, a terminal can differentiate between different cases ofresponse from a network device, thereby reducing a latency andprocessing complexity in a random access procedure.

In this embodiment of the present disclosure, optionally, the indicationinformation includes a first indicator field, and the first indicatorfield indicates that the RAR message includes the BI information or RARinformation.

Optionally, the RAR information includes a RAPID.

Optionally, in a case in which the first indicator field indicates thatthe RAR message includes the RAR information, the indication informationmay include a second indicator field, and the second indicator fieldindicates that the format of the RAR message is a format of fallback RARor a format of success RAR.

Optionally, in a case in which the indication information indicates thatthe format of the RAR message is the format of success RAR, theindication information may further include a third indicator field, andthe third indicator field indicates whether the RAR message includesterminal dedicated data.

Optionally, when the length of the third indicator field is 1 bit, thethird indicator field indicates whether the RAR message includes theterminal dedicated data; or

when the length of the third indicator field is at least 1 bit, thethird indicator field indicates whether the RAR message includes theterminal dedicated data and a quantity of units of the terminaldedicated data included in the RAR message in a case in which the RARmessage includes the terminal dedicated data.

In this embodiment of the present disclosure, optionally, the indicationinformation includes a fourth indicator field, and the fourth indicatorfield indicates any one of the following:

the RAR message includes BI information;

the format of the RAR message is the format of fallback RAR;

the format of the RAR message is the format of success RAR;

whether the RAR message includes terminal dedicated data; and

the RAR message includes a quantity of units of the terminal dedicateddata.

Optionally, in a case in which the indication information indicates thatthe format of the RAR message is a format of fallback RAR, the RARmessage includes a RAPID; or

in a case in which the indication information indicates that the formatof the RAR message is a format of success RAR, the RAR message does notinclude the RAPID.

Optionally, the terminal dedicated data is at least one of a MAC SDU ora MAC CE.

Refer to FIG. 9. FIG. 9 is a flowchart of a random access methodaccording to an embodiment of the present disclosure. The method isapplied to a terminal. As shown in FIG. 9, the method includes thefollowing steps:

Step 901: A random access message is sent to a network device.

Optionally, the random access message may be referred to as a randomaccess request message, Msg1, or MsgA. The random access message mayinclude a C-RNTI.

Step 902: A RAR message is received from the network device.

Optionally, the RAR message includes control information correspondingto a requirement of the terminal.

Step 903: A random access procedure is determined to be successful basedon the control information.

According to the random access method in this embodiment of the presentdisclosure, by using the control information included in the RARmessage, at least content included in an RAR message in a random accessprocedure (for example, a 2-step RACH procedure) can be clear.Therefore, a terminal can differentiate between different cases ofresponse from a network device, thereby reducing a latency andprocessing complexity in a random access procedure.

In this embodiments of the present disclosure, optionally, the controlinformation may include, but is not limited to, any one of the followingitems:

scheduling signaling for parsing a PDCCH by using a C-RNTI;

a TAC MAC CE;

scheduling signaling on new beam resources in a case of beam failurerecovery;

a TAC of a preset length; and

a TAC of a preset length and an uplink scheduling grant.

In an implementation, when the terminal is in an RRC connected mode,triggered by arrival of uplink data or beam failure recovery, theterminal may also initiate a random access procedure. MsgA for theterminal in the connected mode usually includes a C-RNTI of theterminal, to notify the network device an identity of the terminal. Inaddition, MsgA may further include a buffer status report (BSR) or someinformation about bean failure, to make the network device respond basedon a requirement of the terminal after the information is received.

In an example of 2-step RACH, for MsgA including the C-RNTI, a possibleresponse is that the network device delivers uplink scheduling signalingfor a PDCCH addressed by the C-RNTI (PDCCH addressed by C-RNTI) to theterminal. If the terminal receives uplink scheduling signaling dedicatedto the terminal, the terminal may determine that the network devicecorrectly receives MsgA, further determine the 2-step RACH procedure tobe successful, and perform corresponding transmission subsequently basedon network scheduling.

In a case of beam failure recovery, after receiving MsgA for theterminal, the network device may send, on corresponding new beamresources after the beam failure recovery, scheduling signaling for aPDCCH addressed to a C-RNTI to the terminal, where the schedulingsignaling may be uplink, or may be downlink Because a response messageis sent on the new beam resources, after receiving the response message,the terminal may determine that MsgA is successfully received, andfurther determine the random access procedure to be successful.

In addition, because MsgA includes a preamble, the network device mayperform update calculation on an uplink synchronous TA of the terminalafter the preamble is received, or may send a conventional TAC MAC CE tothe terminal for adjustment of a TA by the terminal. Therefore, aftersending MsgA including the C-RNTI, the terminal may determine acorresponding random access procedure to be successful if a TAC MAC CEdedicated to the terminal sent by the network device is received in thewindow of MsgB.

In another implementation, for the terminal in the connected mode, whenthe terminal is currently in an uplink asynchronous state, the networkdevice needs to send TA information to the terminal, where the TAinformation is different from a TAC included in a conventional MAC CE.The conventional TAC is used for adjusting a currently existing TA, andis an offset, but before uplink synchronization is established, aninitial value of a TA is required. The TAC of the conventional MAC CE is6 bits, but a preset length of a TAC for establishing initialsynchronization is, for example, 12 bits. For example, a TAC included ina MAC RAR message is 12 bits.

In this case, to respond to MsgA for the terminal, the network devicemay send one piece of TAC signaling of a preset length, for example,particular TAC signaling of 12 bits, used by the UE to establish initialuplink synchronization Correspondingly, the terminal may determine therandom access procedure to be successful based on the particular TACsignaling of 12 bits.

Optionally, the TAC of the preset length may be indicated by using anLCID.

In an implementation, an example of a TAC of 12 bits is used. As shownin FIG. 10A, one particular LCID indicator field may be allocated in aMAC subheader, to indicate the TAC of 12 bits. A corresponding MAC CEformat may be as shown in FIG. 10B, where the MAC CE format includes theTAC of 12 bits.

The MAC CE format including the TAC of 12 bits may further include a Tfield (such as 1 bit) and a UL Grant field (such as 27 bits). As shownin FIG. 10C, the T field indicates that a TAC field is independentlyincluded, or a TAC field and a UL Grant field are included.

It should be noted that a format of the UL Grant may further use formsother than the foregoing forms, for example, a form of a downlinkcontrol information (DCI) grant MAC CE, at least including atime-frequency resource location, a HARQ process identifier, aredundancy version (RV), a supplement uplink (SUL) indication, and otherinformation.

In addition, in this embodiment, two special LCID indications mayalternatively be used to indicate whether there is a TAC of 12 bits orthere are a TAC of 12 bits and a UL Grant; or L fields are included inthe MAC subheader, to indicate, based on different lengths of L fields,whether there is independently a TAC of 12 bits or there are a TAC of 12bits and a UL Grant.

Optionally, the TAC of the preset length may be indicated by using afirst indicator field in a MAC header.

In an implementation, the first indicator field may be a first R fieldin the MAC subheader, and is indicated by a value different from thefirst R field.

Data transmitted on a DL-SCH usually starts with a MAC subheader, andfirst bits of all MAC subheaders are R fields with a value of 0.Therefore, to find a TAC of 12 bits as quick as possible, as shown inFIG. 11, the first R field of the MAC subheader is set to 1. Acorresponding MAC subPDU format may be as shown in FIG. 11B, where theMAC subPDU format includes the TAC of 12 bits.

The MAC subPDU format including the TAC of 12 bits may further include aT field (such as 1 bit) and a UL Grant field (such as 27 bits). As shownin FIG. 11C, the T field indicates that a TAC field is independentlyincluded, or a TAC field and a UL Grant field are included.

It can be understood that, any of foregoing MAC CE formats or MAC subPDUformats may be used by the terminal to learn that the special TAC of 12bits (or the UL Grant is further) included. For the terminal that sendsMsgA, if the TAC of 12 bits included in the scheduling signaling for thePDCCH addressed to the C-RNTI is received, the terminal can determinethe random access procedure to be successful.

In this embodiment, besides listening on a C-RNTI of the terminal, theterminal may further listen on an RA-RNTI for addressing a PDCCH at thesame time; and if a fallback RAR message for the terminal is received,the terminal may perform a fallback operation. If neither a fallback RARmessage nor a success RAR message is received in a window of MsgB by theterminal, the terminal may determine a random access procedure to beunsuccessful, and retry a random access procedure based on a backoffdelay indicated by a BI.

The foregoing establishments describe the random access method and therandom access response method in the present disclosure. A terminal anda network device in the present disclosure are described below withreference to the embodiments and accompanying drawings.

Refer to FIG. 12. FIG. 12 is a schematic structural diagram of aterminal according to an embodiment of the present disclosure. As shownin FIG. 12, the terminal 120 includes:

a first sending module 121, configured to send random access message toa network device;

a first receiving module 122, configured to receive an RAR message fromthe network device, where the RAR message includes indicationinformation, and the indication information indicates a format type ofthe RAR message; and

an execution module 123, configured to perform a corresponding randomaccess operation based on the indication information.

For the terminal in this embodiment of the present disclosure, thecorresponding random access operation is performed based on theindication information included in the RAR message. The indicationinformation indicates the type of format of the RAR message, so that atleast content included in an RAR message in a random access procedure(for example, a 2-step RACH procedure) can be clear. Therefore,different cases of response from a network device can be differentiated,thereby reducing a latency and processing complexity in a random accessprocedure.

In this embodiment of the present disclosure, optionally, the indicationinformation includes a first indicator field, and the first indicatorfield indicates that the RAR message includes backoff indicator BIinformation or RAR information.

Optionally, the RAR information includes a RAPID.

Optionally, in a case in which the first indicator field indicates thatthe RAR message includes the RAR information, the indication informationmay include a second indicator field, and the second indicator fieldindicates that the format of the RAR message is a format of fallback RARor a format of success RAR.

Optionally, in a case in which the indication information indicates thatthe format of the RAR message is the format of success RAR, theindication information may further include a third indicator field, andthe third indicator field indicates whether the RAR message includesterminal dedicated data.

Optionally, when the length of the third indicator field is 1 bit, thethird indicator field indicates whether the RAR message includes theterminal dedicated data; or when the length of the third indicator fieldis at least 1 bit, the third indicator field indicates whether the RARmessage includes the terminal dedicated data and a quantity of units ofthe terminal dedicated data included in the RAR message in a case inwhich the RAR message includes the terminal dedicated data.

Optionally, the indication information may include a fourth indicatorfield, and the fourth indicator field indicates any one of thefollowing:

the RAR message includes BI information;

the format of the RAR message is the format of fallback RAR;

the format of the RAR message is the format of success RAR;

whether the RAR message includes terminal dedicated data; and

the RAR message includes a quantity of units of the terminal dedicateddata.

Optionally, in a case in which the indication information indicates thatthe format of the RAR message is a format of fallback RAR, the RARmessage includes a RAPID; or

in a case in which the indication information indicates that the formatof the RAR message is a format of success RAR, the RAR message does notinclude the RAPID.

Optionally, the terminal dedicated data is at least one of a MAC SDU ora MAC CE.

Optionally, the execution module 123 is configured to perform any one ofthe following:

in a case in which the indication information indicates that the RARmessage includes BI information, performing a fallback operation basedon the BI information;

in a case in which the indication information indicates that the formatof the RAR message is the format of fallback RAR, performing a fallbackoperation;

in a case in which the indication information indicates that the formatof the RAR message is the format of success RAR, when the RAR messageincludes a contention resolution identifier and the contentionresolution identifier is verified successfully, determining a randomaccess procedure to be successful;

in a case in which the indication information indicates that the formatof the RAR message is the format of success RAR, when the RAR messageincludes a RAPID and a contention resolution identifier and the RAPIDand the contention resolution identifier are verified successfully,determining a random access procedure to be successful;

in a case in which the indication information indicates that the formatof the RAR message is the format of success RAR, when the RAR messageincludes a contention resolution identifier and the contentionresolution identifier is verified successfully, if the RAR messageincludes terminal dedicated data, performing a process of receivingrelated data based on information about the terminal dedicated dataindicated by the indication information; and

in a case in which the indication information indicates that the formatof the RAR message is the format of success RAR, when the RAR messageincludes a RAPID and a contention resolution identifier and the RAPIDand the contention resolution identifier are verified successfully, ifthe RAR message includes terminal dedicated data, performing a processof receiving related data based on information about the terminaldedicated data indicated by the indication information.

Refer to FIG. 13. FIG. 13 is a schematic structural diagram of a networkdevice according to an embodiment of the present disclosure. As shown inFIG. 13, the network device 130 includes:

a second receiving module 131, configured to receive a random accessmessage from a terminal;

a second sending module 132, configured to send an RAR message to theterminal, where

the RAR message includes indication information, and the indicationinformation indicates a format type of the RAR message.

For the network device in this embodiment of the present disclosure, byusing the indication information included in the RAR message, at leastcontent included in an RAR message in a random access procedure (forexample, a 2-step RACH procedure) can be clear. Therefore, a terminalcan differentiate between different cases of response from a networkdevice, thereby reducing a latency and processing complexity in a randomaccess procedure.

Optionally, the indication information includes a first indicator field,and the first indicator field indicates that the RAR message includesthe BI information or RAR information.

Optionally, the RAR information includes a RAPID.

Optionally, in a case in which the first indicator field indicates thatthe RAR message includes the RAR information, the indication informationmay include a second indicator field, and the second indicator fieldindicates that the format of the RAR message is a format of fallback RARor a format of success RAR.

Optionally, in a case in which the indication information indicates thatthe format of the RAR message is the format of success RAR, theindication information may further include a third indicator field, andthe third indicator field indicates whether the RAR message includesterminal dedicated data.

Optionally, when the length of the third indicator field is 1 bit, thethird indicator field indicates whether the RAR message includes theterminal dedicated data; or when the length of the third indicator fieldis at least 1 bit, the third indicator field indicates whether the RARmessage includes the terminal dedicated data and a quantity of units ofthe terminal dedicated data included in the RAR message in a case inwhich the RAR message includes the terminal dedicated data.

Optionally, the indication information may include a fourth indicatorfield, and the fourth indicator field indicates any one of thefollowing:

the RAR message includes BI information;

the format of the RAR message is the format of fallback RAR;

the format of the RAR message is the format of success RAR;

whether the RAR message includes terminal dedicated data; and

the RAR message includes a quantity of units of the terminal dedicateddata.

Optionally, in a case in which the indication information indicates thatthe format of the RAR message is a format of fallback RAR, the RARmessage includes a RAPID; or

in a case in which the indication information indicates that the formatof the RAR message is a format of success RAR, the RAR message does notinclude the RAPID.

Optionally, the terminal dedicated data is at least one of a MAC SDU ora MAC CE.

Refer to FIG. 14. FIG. 14 is a schematic structural diagram of aterminal according to an embodiment of the present disclosure. As shownin FIG. 14, the terminal 140 includes:

a third sending module 141, configured to send random access message toa network device;

a third receiving module 142, configured to receive an RAR message fromthe network device, where the RAR message includes control informationcorresponding to a requirement of the terminal; and

a determining module 143, configured to determine a random accessprocedure to be successful based on the control information.

For the terminal in this embodiment of the present disclosure, by usingthe control information included in the RAR message, at least contentincluded in an RAR message in a random access procedure (for example, a2-step RACH procedure) can be clear. Therefore, different cases ofresponse from a network device can be differentiated, thereby reducing alatency and processing complexity in a random access procedure.

Optionally, the control information may include any one of the followingitems:

scheduling signaling for parsing a PDCCH by using a C-RNTI;

a TAC MAC CE;

scheduling signaling on new beam resources in a case of beam failurerecovery;

a TAC of a preset length; and

a TAC of a preset length and an uplink scheduling grant.

Optionally, in a case in which the control information includes the TACof the preset length, the TAC of the preset length is indicated by usinga logical channel identifier LCID; or

the TAC of the preset length is indicated by using a first indicatorfield in a MAC header.

An embodiment of the present disclosure further provides acommunications device, including a processor, a memory, and a computerprogram that is stored on the memory and executable on the processor.When the computer program is executed by the processor, variousprocesses in the random access method embodiment shown in FIG. 2 areimplemented, or various processes in the random access response methodembodiment shown in FIG. 8 are implemented, or various processes in therandom access method embodiment shown in FIG. 9 are implemented, andsame technical effects can be achieved. To avoid repetition, details arenot described again herein. The communications device may be selected asa terminal or a network device.

FIG. 15 is a schematic diagram of a hardware structure of a terminal forimplementing the embodiments of the present disclosure. The terminal1500 includes but is not limited to: a radio frequency unit 1501, anetwork module 1502, an audio output unit 1503, an input unit 1504, asensor 1505, a display unit 1506, a user input unit 1507, an interfaceunit 1508, a memory 1509, a processor 1510, a power supply 1511, andother components. A person skilled in the art can understand that thestructure of the terminal shown in FIG. 15 does not constitute alimitation on the terminal, and the terminal may include more or fewercomponents than those shown in the figure, or combine some components,or have different component arrangements. In this embodiment of thepresent disclosure, the terminal includes but is not limited to a mobilephone, a tablet computer, a laptop computer, a palmtop computer, avehicle-mounted terminal, a wearable device, a pedometer, and the like.

Optionally, the radio frequency unit 1501 is configured to: send arandom access message to a network device, and receive an RAR messagefrom the network device, where the RAR message includes indicationinformation, and the indication information indicates a format type ofthe RAR message; and the processor 1510 is configured to perform acorresponding random access operation based on the indicationinformation.

Alternatively, the radio frequency unit 1501 is configured to: send arandom access message to a network device, and receive an RAR messagefrom the network device, where the RAR message includes controlinformation corresponding to a requirement of the terminal; and theprocessor 1510 is configured to determine a random access procedure tobe successful based on the control information.

In this embodiment of the present disclosure, at least content includedin an RAR message in a random access procedure (for example, a 2-stepRACH procedure) can be clear. Therefore, a terminal 1500 candifferentiate between different cases of response from a network device,thereby reducing a latency and processing complexity in a random accessprocedure.

It should be noted that the terminal 1500 in this embodiment of thepresent disclosure can implement various processes implemented in theforegoing method embodiment shown in FIG. 2 or various processesimplemented in the foregoing method embodiment shown in FIG. 8, and samebeneficial effects can be achieved. To avoid repetition, details are notdescribed herein again.

It should be understood that, in this embodiment of the presentdisclosure, the radio frequency unit 1501 may be configured to receiveand send information or a signal during a phone call. For example, afterreceiving downlink data from a base station, the radio frequency unit1501 sends the downlink data to the processor 1510 for processing; andsends uplink data to the base station. Generally, the radio frequencyunit 1501 includes but is not limited to an antenna, at least oneamplifier, a transceiver, a coupler, a low noise amplifier, a duplexer,and the like. In addition, the radio frequency unit 1501 may furthercommunicate with a network and another device through a wirelesscommunications system.

The terminal provides wireless broadband Internet access to a userthrough the network module 1502, for example, helps the user receive andsend e-mails, browse web pages, and access streaming media, etc.

The audio output unit 1503 may convert audio data received by the radiofrequency unit 1501 or the network module 1502 or stored in the memory1509 into an audio signal, and output the audio signal into a sound. Inaddition, the audio output unit 1503 may further provide an audio output(for example, a call signal received voice, or a message received voice)related to a specific function executed by the terminal 1500. The audiooutput unit 1503 includes a loudspeaker, a buzzer, a receiver, and thelike.

The input unit 1504 is configured to receive an audio or video signal.The input unit 1504 may include a graphics processing unit (GPU) 15041and a microphone 15042. The graphics processing unit 15041 is configuredto process image data of a static picture or a video obtained by animage capture apparatus (for example, a camera lens) in a video capturemode or an image capture mode. A processed image frame may be displayedon the display unit 1506. The image frame processed by the graphicsprocessing unit 15041 may be stored in the memory 1509 (or anotherstorage medium) or transmitted via the radio frequency unit 1501 or thenetwork module 1502. The microphone 15042 may receive a sound and mayprocess such a sound into audio data. The processed audio data may beconverted, in a phone calling mode, into a format that may betransmitted to a mobile communication base station by using the radiofrequency unit 1501 for output.

The terminal 1500 further includes at least one sensor 1505, forexample, a light sensor, a motion sensor, and another sensor. Forexample, the light sensor includes an ambient light sensor and aproximity sensor, where the ambient light sensor can adjust brightnessof a display panel 15061 based on brightness of ambient light, and theproximity sensor can turn off the display panel 15061 and/or backlightwhen the terminal 1500 is moved towards the ear. As a type of motionsensor, an accelerometer sensor may detect acceleration values indirections (that are generally three axes), and detect a value and adirection of gravity when the accelerometer sensor is static, and may beconfigured to: recognize a terminal posture (for example, screenswitching between landscape and portrait modes, a related game, ormagnetometer posture calibration), and perform a function related tovibration recognition (for example, a pedometer or a knock), and thelike. The sensor 1505 may further include a fingerprint sensor, apressure sensor, an iris sensor, a molecular sensor, a gyroscope, abarometer, a hygrometer, a thermometer, an infrared sensor, and thelike. Details are not described herein again.

The display unit 1506 is configured to display information entered by auser or information provided for the user. The display unit 1506 mayinclude a display panel 15061. The display panel 15061 may be configuredin a form of a liquid crystal display (LCD), an organic light-emittingdiode (OLED), or the like.

The user input unit 1507 may be configured to receive input numeric orcharacter information, and generate key signal inputs related to usersettings and function control of the terminal. The user input unit 1507includes a touch panel 15071 and another input device 15072. The touchpanel 15071 is also referred to as a touchscreen, and may collect atouch operation of the user on or near the touch panel 15071 (forexample, an operation performed on or near the touch panel 15071 by theuser by using any appropriate object or accessory such as a finger or astylus). The touch panel 15071 may include two parts: a touch detectionapparatus and a touch controller. The touch detection apparatus detectsa touch position of a user, detects a signal brought by a touchoperation, and transmits the signal to the touch controller. The touchcontroller receives touch information from the touch detectionapparatus, converts the touch information into contact coordinates,sends the contact coordinates to the processor 1510, and receives andexecutes a command from the processor 1510. In addition, the touch panel15071 may be implemented in various forms, such as a resistance type, acapacitance type, an infrared ray, and a surface acoustic wave. Inaddition to the touch panel 15071, the user input unit 1507 may furtherinclude another input device 15072. The another input device 15072 mayinclude but is not limited to at least one of a physical keyboard, afunctional button (such as a volume control button or a power on/offbutton), a trackball, a mouse, or a joystick. Details are not describedherein.

The touch panel 15071 may cover the display panel 15061. After detectingthe touch operation on or near the touch panel 15071, the touch panel15071 transmits the touch operation to the processor 1510 to determine atype of a touch event, and then the processor 1510 providescorresponding visual output on the display panel 15061 based on the typeof the touch event. In FIG. 15, although the touch panel 15071 and thedisplay panel 15061 are used as two independent parts to implement inputand output functions of the terminal, in some embodiments, the touchpanel 15071 and the display panel 15061 may be integrated to implementthe input and output functions of the terminal. This is not limitedherein.

The interface unit 1508 is an interface connecting an external apparatusand the terminal 1500. For example, the external apparatus may include awired or wireless headset port, an external power supply (or batterycharger) port, a wired or wireless data port, a storage card port, aport configured to connect to an apparatus having an identificationmodule, an audio input/output (I/O) port, a video I/O port, a headsetport, and the like. The interface unit 1508 may be configured to:receive input (for example, data information and power) from theexternal apparatus, and transmit the received input to one or moreelements inside the terminal 1500; or may be configured to transmit databetween the terminal 1500 and the external apparatus.

The memory 1509 may be configured to store a software program andvarious data. The memory 1509 may mainly include a program storage areaand a data storage area. The program storage area may store an operatingsystem, an application program (for example, a sound play function or animage play function) required for at least one function, and the like.The data storage area may store data created based on use of the mobilephone (for example, audio data and a phone book), and the like. Inaddition, the memory 1509 may include a high-speed random access memory,and may further include a nonvolatile memory, for example, at least onedisk storage device, a flash memory, or another volatile solid-statestorage device.

The processor 1510 is a control center of the terminal, and is connectedto all parts of the entire a terminal by using various interfaces andlines, and performs various functions of the terminal and processes databy running or executing the software program and/or a module that arestored in the memory 1509 and invoking the data stored in the memory1509, to implement overall monitoring on the terminal. The processor1510 may include one or more processing units. Optionally, anapplication processor and a modem processor may be integrated into theprocessor 1510. The application processor mainly processes an operatingsystem, a user interface, an application, and the like. The modemprocessor mainly processes wireless communication. It can be understoodthat the foregoing modem processor may alternatively not be integratedin the processor 1510.

The terminal 1500 may further include a power supply 1511 (for example,a battery) that supplies power to various components. Optionally, thepower supply 1511 may be logically connected to the processor 1510through a power supply management system, thereby achieving functions ofmanaging charging, discharging, and power consumption through the powersupply management system.

In addition, the terminal 1500 may further include some functionalmodules not shown. Details are not described herein again.

FIG. 16 is a schematic diagram of a hardware structure of a networkdevice according to various embodiments of the present disclosure. Thenetwork device 160 includes but is not limited to a bus 161, atransceiver 162, an antenna 163, a bus interface 164, a processor 165,and a memory 166.

In this embodiment of the present disclosure, the network device 160further includes: a computer program stored in the memory 166 andexecutable on the processor 165. Optimally, when the computer program isexecuted by the processor 165, the following steps are furtherimplemented:

A random access message is received from a terminal; and

an RAR message is sent to the terminal, where the RAR message includesindication information, and the indication information indicates aformat type of the RAR message.

In this embodiment of the present disclosure, the network device 160 canimplement processes implemented in the foregoing method embodiment shownin FIG. 9, and a same beneficial effect can be achieved. To avoidrepetition, details are not described herein again.

The transceiver 162 is configured to receive and send data under controlof the processor 165.

In FIG. 16, for a bus architecture (represented by the bus 161), the bus161 may include any quantity of interconnecting buses and bridges, andthe bus 161 interconnects various circuits of one or more processorsrepresented by the processor 165 and a memory represented by the memory166. The bus 161 may further link together various other circuits, suchas a peripheral device, a voltage regulator, and a power managementcircuit. These are all well known in the art. Therefore, thisspecification provides no further description. The bus interface 164provides an interface between the bus 161 and the transceiver 162. Thetransceiver 162 may be one or more elements, for example, a plurality ofreceivers and transmitters, and provides a unit that is configured tocommunicate with various other apparatuses on a transmission medium.Data processed by the processor 165 is transmitted on a wireless mediumby using the antenna 163. The antenna 163 receives data and transmitsthe data to the processor 165.

The processor 165 is responsible for managing the bus 161 and generalprocessing, and may further provide various functions, including timing,peripheral interfacing, voltage regulation, power management, andanother control function. The memory 166 may be configured to store dataused by the processor 165 when performing an operation.

Optionally, the processor 165 may be a central processing unit (CPU), anapplication specific integrated circuits (ASIC), a field-programmablegate array (FPGA), or a complex programmable logic device (CPLD).

An embodiment of the present disclosure further provides anon-transitory computer-readable storage medium, where the no-transitorycomputer-readable storage medium includes a computer program. When thecomputer program is executed by a processor, various processes in therandom access method embodiment shown in FIG. 2 are implemented, orvarious processes in the random access response method embodiment shownin FIG. 8 are implemented, or various processes in the random accessmethod embodiment shown in FIG. 9 are implemented, and same technicaleffects can be achieved. To avoid repetition, details are not describedagain herein. The non-transitory computer-readable storage medium is,for example, a read-only memory (ROM), a random access memory (RAM), amagnetic disk, or an optical disc.

It should be noted that in this specification, terms “include”,“comprise” or any other variants thereof are intended to covernon-exclusive inclusion, so that a process, a method, an article or anapparatus that includes a series of elements not only includes thoseelements, but also includes other elements that are not explicitlylisted, or includes inherent elements of the process, method, article,or apparatus. In absence of more constraints, an element preceded by“includes a . . . ” does not preclude the existence of other identicalelements in the process, method, article, or apparatus that includes theelement.

Based on the foregoing descriptions of the embodiments, a person skilledin the art may clearly understand that the method in the foregoingembodiment may be implemented by software in addition to a necessaryuniversal hardware platform or by hardware only. In most circumstances,the former is a preferred implementation manner. Based on such anunderstanding, the technical solutions of the present disclosureessentially or the part contributing to the related technologies may beimplemented in a form of a software product. The computer softwareproduct is stored in a storage medium (for example, a ROM/RAM, amagnetic disk, or a compact disc), and includes a plurality ofinstructions for instructing a terminal (which may be a mobile phone, acomputer, a server, an air conditioner, a network device, or the like)to perform the method described in the embodiments of the presentdisclosure.

The embodiments of the present disclosure are described above withreference to the accompanying drawings, but the present disclosure isnot limited to the foregoing specific implementations. The foregoingspecific implementations are merely examples instead of restrictions.With enlightenment because of the present disclosure, a person ofordinary skills in the art may make many forms without departing fromthe aim of the present disclosure and the protection scope of theclaims, all of which fall within the protection of the presentdisclosure.

What is claimed is:
 1. A random access method applied to a terminal,comprising: sending a random access message to a network device;receiving a random access response (RAR) message from the networkdevice, wherein the RAR message comprises indication information, andthe indication information indicates a format type of the RAR message;and performing a corresponding random access operation based on theindication information.
 2. The method according to claim 1, wherein theindication information comprises a second indicator field, and thesecond indicator field indicates that the format of the RAR message is aformat of fallback RAR or a format of success RAR.
 3. The methodaccording to claim 1, wherein in a case in which the indicationinformation indicates that the format of the RAR message is a format ofsuccess RAR, the indication information further comprises a thirdindicator field, and the third indicator field indicates whether the RARmessage comprises terminal dedicated data.
 4. The method according toclaim 3, wherein in a case in which a length of the third indicatorfield is one bit, the third indicator field indicates whether the RARmessage comprises the terminal dedicated data; or in a case in which thelength of the third indicator field is at least one bit, the thirdindicator field indicates whether the RAR message comprises the terminaldedicated data and a quantity of units of the terminal dedicated datacomprised in the RAR message in a case in which the RAR messagecomprises the terminal dedicated data.
 5. The method according to claim1, wherein the indication information comprises a fourth indicatorfield, and the fourth indicator field indicates any one of following:the RAR message comprises backoff indicator (BI) information; and theformat of the RAR message is a format of success RAR.
 6. The methodaccording to claim 1, wherein in a case in which the indicationinformation indicates that the format of the RAR message is a format offallback RAR, the RAR message comprises a random access preambleidentifier (RAPID); or in a case in which the indication informationindicates that the format of the RAR message is a format of success RAR,the RAR message does not comprise the RAPID.
 7. The method according toclaim 3, wherein the terminal dedicated data is at least one of a mediaaccess control (MAC) service data unit (SDU) or a MAC control element(CE).
 8. The method according to claim 1, wherein the performing acorresponding random access operation based on the indicationinformation comprises at least one of: in a case in which the indicationinformation indicates that the RAR message comprises backoff indicator(BI) information, performing a fallback operation based on the BIinformation; in a case in which the indication information indicatesthat the format of the RAR message is a format of fallback RAR,performing the fallback operation; in a case in which the indicationinformation indicates that the format of the RAR message is a format ofsuccess RAR, and the RAR message comprises a contention resolutionidentifier and the contention resolution identifier is verifiedsuccessfully, determining a random access procedure to be successful; ina case in which the indication information indicates that the format ofthe RAR message is a format of success RAR, and the RAR messagecomprises a random access preamble identifier (RAPID) and a contentionresolution identifier, and the RAPID and the contention resolutionidentifier are verified successfully, determining a random accessprocedure to be successful; in a case in which the indicationinformation indicates that the format of the RAR message is a format ofsuccess RAR, and the RAR message comprises a contention resolutionidentifier, and the contention resolution identifier is verifiedsuccessfully, if the RAR message comprises terminal dedicated data,performing a process of receiving related data based on informationabout the terminal dedicated data indicated by the indicationinformation; or in a case in which the indication information indicatesthat the format of the RAR message is a format of success RAR, and theRAR message comprises a RAPID and a contention resolution identifier andthe RAPID and the contention resolution identifier are verifiedsuccessfully, if the RAR message comprises terminal dedicated data,performing a process of receiving related data based on informationabout the terminal dedicated data indicated by the indicationinformation.
 9. A random access response method applied to a networkdevice, comprising: receiving a random access message from a terminal;sending a random access response (RAR) message to the terminal, whereinthe RAR message comprises indication information, and the indicationinformation indicates a format type of the RAR message.
 10. The methodaccording to claim 9, wherein the indication information comprises asecond indicator field, and the second indicator field indicates thatthe format of the RAR message is a format of fallback RAR or a format ofsuccess RAR.
 11. The method according to claim 9, wherein in a case inwhich the indication information indicates that the format of the RARmessage is a format of success RAR, the indication information furthercomprises a third indicator field, and the third indicator fieldindicates whether the RAR message comprises terminal dedicated data. 12.The method according to claim 11, wherein in a case in which a length ofthe third indicator field is one bit, the third indicator fieldindicates whether the RAR message comprises the terminal dedicated data;or in a case in which the length of the third indicator field is atleast one bit, the third indicator field indicates whether the RARmessage comprises the terminal dedicated data and a quantity of units ofthe terminal dedicated data comprised in the RAR message in a case inwhich the RAR message comprises the terminal dedicated data.
 13. Themethod according to claim 9, wherein the indication informationcomprises a fourth indicator field, and the fourth indicator fieldindicates any one of following: the RAR message comprises backoffindicator (BI) information; and the format of the RAR message is aformat of success RAR.
 14. The method according to claim 9, wherein in acase in which the indication information indicates that the format ofthe RAR message is a format of fallback RAR, the RAR message comprises arandom access preamble identifier (RAPID); or in a case in which theindication information indicates that the format of the RAR message is aformat of success RAR, the RAR message does not comprise the RAPID. 15.The method according to claim 11, wherein the terminal dedicated data isat least one of a media access control (MAC) service data unit (SDU) ora MAC control element (CE).
 16. A terminal, comprising a memory, aprocessor, and a computer program that is stored on the memory andexecutable on the processor, wherein the computer program, when executedby the processor, causes the terminal to perform: sending a randomaccess message to a network device; receiving a random access response(RAR) message from the network device, wherein the RAR message comprisesindication information, and the indication information indicates aformat type of the RAR message; and performing a corresponding randomaccess operation based on the indication information.
 17. The terminalaccording to claim 16, wherein the indication information comprises asecond indicator field, and the second indicator field indicates thatthe format of the RAR message is a format of fallback RAR or a format ofsuccess RAR.
 18. The terminal according to claim 16, wherein in a casein which the indication information indicates that the format of the RARmessage is a format of success RAR, the indication information furthercomprises a third indicator field, and the third indicator fieldindicates whether the RAR message comprises terminal dedicated data. 19.The terminal according to claim 18, wherein in a case in which a lengthof the third indicator field is one bit, the third indicator fieldindicates whether the RAR message comprises the terminal dedicated data;or in a case in which the length of the third indicator field is atleast one bit, the third indicator field indicates whether the RARmessage comprises the terminal dedicated data and a quantity of units ofthe terminal dedicated data comprised in the RAR message in a case inwhich the RAR message comprises the terminal dedicated data.
 20. Theterminal according to claim 16, wherein the indication informationcomprises a fourth indicator field, and the fourth indicator fieldindicates any one of: the RAR message comprises backoff indicator (BI)information; and the format of the RAR message is a format of successRAR.